package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Basic_Employee", description = "人员表")
@TableName(value = "Basic_Employee")
public class BasicEmployee extends FBaseEntity implements Serializable {



    @NotBlank(message="[人员编码]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("人员编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "code")
    private String code;

    @NotBlank(message="[人员名称]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("人员名称")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "name")
    private String name;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;

    @NotNull(message="[状态]不能为空")
    @ApiModelProperty("状态")
    @TableField(value = "status")
    @Dict(dictCode = "sys_normal_disable")
    private Long status;

    @NotNull(message="[入职日期]不能为空")
    @ApiModelProperty("入职日期")
    @TableField(value = "enterDate")
    private Date enterDate;

    @NotNull(message="[性别]不能为空")
    @ApiModelProperty("性别")
    @TableField(value = "sex")
    @Dict(dictCode = "sys_user_sex")
    private Long sex;

    @NotNull(message="[所属部门ID]不能为空")
    @ApiModelProperty("所属部门ID")
    @TableField(value = "deptId")
    @Dict(dictCode = "dept_id",dictTable = "sys_dept",dictText = "dept_name")
    private Long deptId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("IC卡号")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "iCNum")
    private String iCNum;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("帐户")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "account")
    private String account;

    @ApiModelProperty("")
    @TableField(value = "wareHouseId")
    private Long wareHouseId;






}

